/*
 * Function0.h
 *
 * Code generation for model "Function0".
 *
 * Model version              : 5.440
 * Simulink Coder version : 9.7 (R2022a) 13-Nov-2021
 * C source code generated on : Tue May 16 10:41:55 2023
 *
 * Target selection: grt.tlc
 * Note: GRT includes extra infrastructure and instrumentation for prototyping
 * Embedded hardware selection: Intel->x86-64 (Windows64)
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#ifndef RTW_HEADER_Function0_h_
#define RTW_HEADER_Function0_h_
#ifndef Function0_COMMON_INCLUDES_
#define Function0_COMMON_INCLUDES_
#include "rtwtypes.h"
#include "rtw_continuous.h"
#include "rtw_solver.h"
#include "rt_logging.h"
#endif                                 /* Function0_COMMON_INCLUDES_ */

#include "Function0_types.h"
#include <float.h>
#include <string.h>
#include <stddef.h>
#include "rt_nonfinite.h"

/* Macros for accessing real-time model data structure */
#ifndef rtmGetFinalTime
#define rtmGetFinalTime(rtm)           ((rtm)->Timing.tFinal)
#endif

#ifndef rtmGetRTWLogInfo
#define rtmGetRTWLogInfo(rtm)          ((rtm)->rtwLogInfo)
#endif

#ifndef rtmGetErrorStatus
#define rtmGetErrorStatus(rtm)         ((rtm)->errorStatus)
#endif

#ifndef rtmSetErrorStatus
#define rtmSetErrorStatus(rtm, val)    ((rtm)->errorStatus = (val))
#endif

#ifndef rtmGetStopRequested
#define rtmGetStopRequested(rtm)       ((rtm)->Timing.stopRequestedFlag)
#endif

#ifndef rtmSetStopRequested
#define rtmSetStopRequested(rtm, val)  ((rtm)->Timing.stopRequestedFlag = (val))
#endif

#ifndef rtmGetStopRequestedPtr
#define rtmGetStopRequestedPtr(rtm)    (&((rtm)->Timing.stopRequestedFlag))
#endif

#ifndef rtmGetT
#define rtmGetT(rtm)                   ((rtm)->Timing.taskTime0)
#endif

#ifndef rtmGetTFinal
#define rtmGetTFinal(rtm)              ((rtm)->Timing.tFinal)
#endif

#ifndef rtmGetTPtr
#define rtmGetTPtr(rtm)                (&(rtm)->Timing.taskTime0)
#endif

/* External inputs (root inport signals with default storage) */
typedef struct {
  real_T input[2];                     /* '<Root>/Input' */
} ExtU_Function0_T;

/* External outputs (root outports fed by signals with default storage) */
typedef struct {
  real_T Output;                       /* '<Root>/Output' */
} ExtY_Function0_T;

/* Parameters (default storage) */
struct P_Function0_T_ {
  real_T mapminmax_xmax[2];            /* Mask Parameter: mapminmax_xmax
                                        * Referenced by: '<S33>/range y // range x'
                                        */
  real_T mapminmax_reverse_xmax;       /* Mask Parameter: mapminmax_reverse_xmax
                                        * Referenced by: '<S34>/Divide by range y'
                                        */
  real_T mapminmax_xmin[2];            /* Mask Parameter: mapminmax_xmin
                                        * Referenced by:
                                        *   '<S33>/Subtract min x'
                                        *   '<S33>/range y // range x'
                                        */
  real_T mapminmax_reverse_xmin;       /* Mask Parameter: mapminmax_reverse_xmin
                                        * Referenced by:
                                        *   '<S34>/Add min x'
                                        *   '<S34>/Divide by range y'
                                        */
  real_T mapminmax_ymax;               /* Mask Parameter: mapminmax_ymax
                                        * Referenced by: '<S33>/range y // range x'
                                        */
  real_T mapminmax_reverse_ymax;       /* Mask Parameter: mapminmax_reverse_ymax
                                        * Referenced by: '<S34>/Divide by range y'
                                        */
  real_T mapminmax_ymin;               /* Mask Parameter: mapminmax_ymin
                                        * Referenced by:
                                        *   '<S33>/Add min y'
                                        *   '<S33>/range y // range x'
                                        */
  real_T mapminmax_reverse_ymin;       /* Mask Parameter: mapminmax_reverse_ymin
                                        * Referenced by:
                                        *   '<S34>/Subtract min y'
                                        *   '<S34>/Divide by range y'
                                        */
  real_T IW211_Value[20];
  /* Expression: [0.2075816912142383063866191150736995041370391845703125;0.56674301605118981850495174512616358697414398193359375;-0.0027109924871798092571584248844374087639153003692626953125;-0.48863508096942276370810986918513663113117218017578125;-0.5933962162401227313779372707358561456203460693359375;-0.07548122878059349005752665107138454914093017578125;-0.00995571075149400026849111355886634555645287036895751953125;0.03650927198735819112496159277725382708013057708740234375;0.0477695501055910576315710613926057703793048858642578125;-0.0105099061516157159246187546841611037962138652801513671875;-0.05643796895409193548065474033137434162199497222900390625;-0.01147804977123507812197811261967217433266341686248779296875;-0.00968612340633972883352509342103076050989329814910888671875;0.06257380170820524278862961864433600567281246185302734375;-0.03138667572492366553138509743803297169506549835205078125;-0.189761441545514386586290811465005390346050262451171875;-0.141743422466794999348138617278891615569591522216796875;0.1041954357074171555463948379838257096707820892333984375;-0.0087872072652021883387707390511423000134527683258056640625;-0.06509831155932956081588969254880794323980808258056640625]
   * Referenced by: '<S30>/IW{2,1}(1,:)''
   */
  real_T IW111_Value[2];
  /* Expression: [5.5848410133544543754169353633187711238861083984375;-2.5760370402206245188381217303685843944549560546875]
   * Referenced by: '<S7>/IW{1,1}(1,:)''
   */
  real_T IW112_Value[2];
  /* Expression: [1.7289055207179482298585071475827135145664215087890625;-3.638661676598828886852743380586616694927215576171875]
   * Referenced by: '<S7>/IW{1,1}(2,:)''
   */
  real_T IW113_Value[2];
  /* Expression: [4.97856010184767416859585864585824310779571533203125;-4.01178970742105089897222569561563432216644287109375]
   * Referenced by: '<S7>/IW{1,1}(3,:)''
   */
  real_T IW114_Value[2];
  /* Expression: [6.69745577871375186163049875176511704921722412109375;-0.494083734463258095193083363483310677111148834228515625]
   * Referenced by: '<S7>/IW{1,1}(4,:)''
   */
  real_T IW115_Value[2];
  /* Expression: [-5.98080099878284965342345458338968455791473388671875;0.412576173832532422380836578668095171451568603515625]
   * Referenced by: '<S7>/IW{1,1}(5,:)''
   */
  real_T IW116_Value[2];
  /* Expression: [5.35648612940535873150338375126011669635772705078125;2.5232102354818177758488673134706914424896240234375]
   * Referenced by: '<S7>/IW{1,1}(6,:)''
   */
  real_T IW117_Value[2];
  /* Expression: [0.366769656139322108856504200957715511322021484375;6.339636114448563120049584540538489818572998046875]
   * Referenced by: '<S7>/IW{1,1}(7,:)''
   */
  real_T IW118_Value[2];
  /* Expression: [1.40012319764120096721171648823656141757965087890625;6.00849804741413517916726050316356122493743896484375]
   * Referenced by: '<S7>/IW{1,1}(8,:)''
   */
  real_T IW119_Value[2];
  /* Expression: [6.104557309378140672606605221517384052276611328125;0.6767577251696705875616544290096499025821685791015625]
   * Referenced by: '<S7>/IW{1,1}(9,:)''
   */
  real_T IW1110_Value[2];
  /* Expression: [-6.237267506145631301706089288927614688873291015625;-0.0179485048800308612249043704878204152919352054595947265625]
   * Referenced by: '<S7>/IW{1,1}(10,:)''
   */
  real_T IW1111_Value[2];
  /* Expression: [5.6809668236330868040795394335873425006866455078125;2.679644819467531302592533393180929124355316162109375]
   * Referenced by: '<S7>/IW{1,1}(11,:)''
   */
  real_T IW1112_Value[2];
  /* Expression: [-6.12807027443754659401520257233642041683197021484375;1.2410330631242254550983261651708744466304779052734375]
   * Referenced by: '<S7>/IW{1,1}(12,:)''
   */
  real_T IW1113_Value[2];
  /* Expression: [-0.88080011021081860977943733814754523336887359619140625;6.09846521642208561075904071913100779056549072265625]
   * Referenced by: '<S7>/IW{1,1}(13,:)''
   */
  real_T IW1114_Value[2];
  /* Expression: [-3.73113296317438258853371735312975943088531494140625;4.73228331770079346796364916372112929821014404296875]
   * Referenced by: '<S7>/IW{1,1}(14,:)''
   */
  real_T IW1115_Value[2];
  /* Expression: [-5.74922252895797658567289545317180454730987548828125;2.502884791943902786925946202245540916919708251953125]
   * Referenced by: '<S7>/IW{1,1}(15,:)''
   */
  real_T IW1116_Value[2];
  /* Expression: [-5.21815444027704433693770624813623726367950439453125;3.4311560494465869197711072047241032123565673828125]
   * Referenced by: '<S7>/IW{1,1}(16,:)''
   */
  real_T IW1117_Value[2];
  /* Expression: [5.746740570924504964978041243739426136016845703125;-2.662708169234801136582291292143054306507110595703125]
   * Referenced by: '<S7>/IW{1,1}(17,:)''
   */
  real_T IW1118_Value[2];
  /* Expression: [-0.435428620721411252514343459552037529647350311279296875;-5.63137664549712013695170753635466098785400390625]
   * Referenced by: '<S7>/IW{1,1}(18,:)''
   */
  real_T IW1119_Value[2];
  /* Expression: [6.082470956484062440949855954386293888092041015625;1.52781065656511838568576422403566539287567138671875]
   * Referenced by: '<S7>/IW{1,1}(19,:)''
   */
  real_T IW1120_Value[2];
  /* Expression: [-4.32313467868377276914770845905877649784088134765625;-3.438629504540900772013856112607754766941070556640625]
   * Referenced by: '<S7>/IW{1,1}(20,:)''
   */
  real_T b1_Value[20];
  /* Expression: [-6.729014873974762167563312686979770660400390625;-4.92820983569697990134272913564927875995635986328125;-4.73053185017346766727541762520559132099151611328125;-4.0458666486036225506950358976610004901885986328125;3.607566512123038915405004445347003638744354248046875;-3.444031198271304550218019357998855412006378173828125;-2.103495030997410086825993857928551733493804931640625;-1.867937140069849899504106360836885869503021240234375;-0.89061831000886126918913987537962384521961212158203125;0.2459311485163024058042680053404183126986026763916015625;-0.1401788540453946796393580598305561579763889312744140625;-0.9642686218549212373574164303136058151721954345703125;-1.88811019827621340283485551481135189533233642578125;-2.7813685417662981080866302363574504852294921875;-3.047184856800153607281345102819614112377166748046875;-3.90849825161417196994761980022303760051727294921875;4.1129767248049073913307438488118350505828857421875;-5.2381605861504763055336297838948667049407958984375;5.587498938086781663514557294547557830810546875;-6.9775136577315155506084920489229261875152587890625]
   * Referenced by: '<S2>/b{1}'
   */
  real_T Gain_Gain;                    /* Expression: -2
                                        * Referenced by: '<S8>/Gain'
                                        */
  real_T one_Value;                    /* Expression: 1
                                        * Referenced by: '<S8>/one'
                                        */
  real_T Gain1_Gain;                   /* Expression: 2
                                        * Referenced by: '<S8>/Gain1'
                                        */
  real_T one1_Value;                   /* Expression: 1
                                        * Referenced by: '<S8>/one1'
                                        */
  real_T b2_Value;
         /* Expression: 0.360634696106465535425655843937420286238193511962890625
          * Referenced by: '<S3>/b{2}'
          */
};

/* Real-time Model Data Structure */
struct tag_RTM_Function0_T {
  const char_T *errorStatus;
  RTWLogInfo *rtwLogInfo;

  /*
   * Timing:
   * The following substructure contains information regarding
   * the timing information for the model.
   */
  struct {
    time_T taskTime0;
    uint32_T clockTick0;
    uint32_T clockTickH0;
    time_T stepSize0;
    time_T tFinal;
    boolean_T stopRequestedFlag;
  } Timing;
};

/* Block parameters (default storage) */
extern P_Function0_T Function0_P;

/* External inputs (root inport signals with default storage) */
extern ExtU_Function0_T Function0_U;

/* External outputs (root outports fed by signals with default storage) */
extern ExtY_Function0_T Function0_Y;

/* Model entry point functions */
extern void Function0_initialize(void);
extern void Function0_step(void);
extern void Function0_terminate(void);

/* Real-time Model object */
extern RT_MODEL_Function0_T *const Function0_M;

/*-
 * The generated code includes comments that allow you to trace directly
 * back to the appropriate location in the model.  The basic format
 * is <system>/block_name, where system is the system number (uniquely
 * assigned by Simulink) and block_name is the name of the block.
 *
 * Note that this particular code originates from a subsystem build,
 * and has its own system numbers different from the parent model.
 * Refer to the system hierarchy for this subsystem below, and use the
 * MATLAB hilite_system command to trace the generated code back
 * to the parent model.  For example,
 *
 * hilite_system('duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4')    - opens subsystem duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4
 * hilite_system('duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Kp') - opens and selects block Kp
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : 'duct_model_2017a/kinect_equation system/CdNet'
 * '<S1>'   : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4'
 * '<S2>'   : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1'
 * '<S3>'   : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 2'
 * '<S4>'   : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Process Input 1'
 * '<S5>'   : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Process Output 1'
 * '<S6>'   : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/Delays 1'
 * '<S7>'   : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}'
 * '<S8>'   : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/tansig'
 * '<S9>'   : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod1'
 * '<S10>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod10'
 * '<S11>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod11'
 * '<S12>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod12'
 * '<S13>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod13'
 * '<S14>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod14'
 * '<S15>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod15'
 * '<S16>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod16'
 * '<S17>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod17'
 * '<S18>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod18'
 * '<S19>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod19'
 * '<S20>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod2'
 * '<S21>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod20'
 * '<S22>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod3'
 * '<S23>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod4'
 * '<S24>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod5'
 * '<S25>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod6'
 * '<S26>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod7'
 * '<S27>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod8'
 * '<S28>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 1/IW{1,1}/dotprod9'
 * '<S29>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 2/Delays 1'
 * '<S30>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 2/LW{2,1}'
 * '<S31>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 2/purelin'
 * '<S32>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Layer 2/LW{2,1}/dotprod1'
 * '<S33>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Process Input 1/mapminmax'
 * '<S34>'  : 'duct_model_2017a/kinect_equation system/CdNet/Function Fitting Neural NetworkCd4/Process Output 1/mapminmax_reverse'
 */
#endif                                 /* RTW_HEADER_Function0_h_ */
